<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <meta http-equiv="X-UA-Compatible" content="ie=edge" />
    <title>商品列表</title>
    <link href="https://cdn.bootcss.com/twitter-bootstrap/3.3.7/css/bootstrap.min.css" rel="stylesheet" />
</head>

<body>
    <div class="panel panel-info">
        <div class="panel-heading">
            <h3 class="panel-title">商品列表</h3>
        </div>
        <a href="/products/new" class="btn btn-primary">新增商品</a>
        <div class="panel-body">
            <table class="table table-bordered table-hover">
                <thead>
                    <tr>
                        <th>商品id</th>
                        <th>商品名称</th>
                        <th>商品价格</th>
                        <th>商品描述</th>
                        <th>操作</th>
                    </tr>
                </thead>
                <tbody>
                    <%shops.forEach(item=>{%>
                    <tr>
                        <td><%= item.id %></td>
                        <td><%= item.pname%></td>
                        <td><%= item.pprice%></td>
                        <td><%= item.pdesc%></td>
                    </tr>
                    <%})%>
                </tbody>
            </table>
        </div>
    </div>
</body>

</html>